﻿<%@ Page Title="" Language="C#" EnableEventValidation="false" MasterPageFile="~/rightContent.Master"
    AutoEventWireup="true" CodeBehind="YSshou.aspx.cs" Inherits="WEB.T_all.YSshou" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
    应收实收
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <table style="width: 100%;">
        <tr>
            <td align="center">
                <table class="distance" width="650px">
                    <tr>
                        <td align="right" class="style8">
                            <asp:Button ID="YSfu" runat="server" Text="查看应付实付" 
                                CssClass="Submit_yellowbig" Height="27px" Width="104px" 
                                onclick="YSfu_Click" />
                        </td>
                        <td align="right" class="style8">
                            &nbsp;</td>
                        <td class="style2" align="left">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td align="right" class="style8">
                            <asp:Button ID="btLirun" runat="server" 
                                OnClick="btLirun_Click" Text="查看利润统计" 
                                CssClass="Submit_yellowbig" Width="104px" Height="27px" />
                        </td>
                        <td align="right" class="style8">
                            按时间段:
                        </td>
                        <td class="style2" align="left">
                            <asp:TextBox ID="tbGency" runat="server" class="Wdate" OnTextChanged="tbGency_TextChanged"
                                Height="22px" Width="171px"></asp:TextBox>
                            &nbsp;至 <asp:TextBox ID="tbGency1" runat="server" class="Wdate" OnTextChanged="tbGency_TextChanged"
                                Height="22px" Width="171px"></asp:TextBox>
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td align="right" class="style9">
                            <asp:Button ID="btWS" runat="server" 
                                OnClick="btWS_Click" Text="未收款项" 
                                CssClass="Submit_yellowbig" Width="104px" Height="27px" />
                        </td>
                        <td align="right" class="style9">
                            客户:
                        </td>
                        <td class="style11" align="left">
                            <asp:TextBox ID="tbCus" runat="server" Width="183px"></asp:TextBox>
                            <asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" ServiceMethod="GetCustomersName"
                              TargetControlID="tbCus" MinimumPrefixLength="1" CompletionInterval="358">
                             </asp:AutoCompleteExtender>
                            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="  查 询" CssClass="Submit_Query" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnExcel" runat="server" Text="   导出Excel" OnClick="btnExcel_Click"
                                CssClass="Submit_yellowDown" Height="27px" Width="104px" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right" class="style9">
                            <asp:Button ID="btWF" 
                                runat="server" OnClick="btWF_Click" Text="未付款项" 
                                CssClass="Submit_yellowbig" Width="104px" Height="27px" />
                        </td>
                        <td align="right" class="style9">
                            &nbsp;</td>
                        <td class="style11" align="left">
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="center" class="style1" colspan="2" valign="top">
                <asp:GridView ID="gvTALL" runat="server" AutoGenerateColumns="False" Height="40px"
                    Style="margin-top: 0px" Width="823px" CellPadding="3" DataKeyNames="sheetID"
                    ForeColor="Black" GridLines="Vertical" 
                    OnRowDataBound="gvTALL_RowDataBound" PageSize="15"
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" 
                    BorderWidth="1px" AllowPaging="True" 
                    onpageindexchanging="gvTALL_PageIndexChanging">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="sheetID" HeaderText="委托单号">
                            <ControlStyle Height="18px" Width="30px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="contractno" HeaderText="合同号" />
                        <asp:BoundField DataField="shipName" HeaderText="船名" />
                        <asp:BoundField DataField="goodsname" HeaderText="货名" />
                        <asp:BoundField DataField="customername" HeaderText="客户" />
                        <asp:BoundField DataField="agencydate" HeaderText="日期" DataFormatString="{0:yyyy-MM-dd}" />
                        <asp:BoundField DataField="Yshou" HeaderText="应收款(元)" />
                        <asp:BoundField DataField="Sshou" HeaderText="实收款(元)" />
                        <asp:BoundField HeaderText="差额(元)">
                            <ItemStyle Font-Underline="True" ForeColor="Red" />
                        </asp:BoundField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                </asp:GridView>
                            <asp:Label ID="LBmo" runat="server"></asp:Label>
                            <asp:Label ID="LBkai" runat="server"></asp:Label>
                            <asp:Label ID="LBcus" runat="server"></asp:Label>
                <br />
                <asp:Label ID="Label5" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center" class="style7" colspan="2" bgcolor="#FFFF99" valign="top">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="Label4" runat="server" Text="合计:"></asp:Label>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 总应收款:<asp:Label ID="Label1" runat="server" Text="0"></asp:Label>
                &nbsp;元&nbsp;&nbsp; 总实收款:<asp:Label ID="Label2" runat="server" Text="0"></asp:Label>
                &nbsp;元&nbsp;&nbsp; 总未收金额:<asp:Label ID="Label3" runat="server" Text="0"></asp:Label>
                &nbsp;元
            </td>
        </tr>
    </table>
</asp:Content>
